package com.example.smart_community.mapper;

import com.example.smart_community.po.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PostMapper {
    @Select("select * from post where p_id=#{pId}")
    @Results({
            @Result(property = "pId",column = "p_id"),
            @Result(property = "pName",column = "p_name")
    })
    Post selectById(Integer pId);
}
